package main

import "fmt"

func main() {

	foodSlice1 := []string{"米饭1", "馒头1"}
	foodSlice2 := []string{"米饭2", "馒头2", "巧克力2"}

	copy(foodSlice1, foodSlice2)

	fmt.Println(foodSlice1)
	fmt.Println(foodSlice2)

	foodSlice3 := []string{"米饭3", "馒头3"}
	foodSlice4 := []string{"米饭4", "花卷4", "巧克力4"}

	copy(foodSlice4, foodSlice3)

	fmt.Println(foodSlice3)
	fmt.Println(foodSlice4)
}
